import { useState } from 'react'
import logo from './logo.svg'
import './App.css'
import { Provider } from 'react-redux'
import store from './store/index.js'
import { BrowserRouter } from 'react-router-dom'
import { renderRoutes } from 'react-router-config'
import routes from './routes/index'

function App() {

  return (
    // 使得每一个路由都可以提取到总仓库里面的数据
    <Provider store={store}>
      <div className='App'>
        <BrowserRouter>
          {renderRoutes(routes)}
        </BrowserRouter>
      </div>
    </Provider>
  )
}

export default App
